import request from '@/utils/request'
const api_name = 'subject'
export default {
    //获取课程列表
    getList() {
        return request({
            url: `/${api_name}`,
            method: 'get'
        })
    },
    // 添加课程
    postList(classData) {
        return request({
            url: `/${api_name}`,
            method: 'post',
            data: classData
        })
    },
    // 删除课程
    deleteClass(id) {
        return request({
            url: `/${api_name}/${id}`,
            method: 'delete'
        })
    }

}